#ifndef SPACE_TOUCH_KERNEL_MOUSE_HANDLE_H
#define SPACE_TOUCH_KERNEL_MOUSE_HANDLE_H

#include <array>
#include <stdint.h>

enum MOUSE_KEY
{
    MOUSE_KEY_NONE,
    MOUSE_KEY_LBUTTON,
    MOUSE_KEY_RBUTTON,
    MOUSE_KEY_MBUTTON,
    MOUSE_KEY_XBUTTON_1,
    MOUSE_KEY_XBUTTON_2,
    MOUSE_KEY_MAX,
};

struct MouseData
{
    uint64_t wParam;
    int32_t pt[2];
    uint32_t mouseData;
    uint32_t flags;
    uint32_t time;
    uint32_t dbclick;
    MOUSE_KEY curKey;
    uint64_t dwExtraInfo;
};

using PFN_MouseProcess = void (*)(const MouseData *);


class Mouse
{
public:
    static Mouse &GetInstance();

    void AddProc(PFN_MouseProcess fn);
    void DelProc(PFN_MouseProcess fn);

    bool IsButtomDown(const MOUSE_KEY btn);
private:
    Mouse();
    ~Mouse();
};

#endif // SPACE_TOUCH_KERNEL_KEYBARD_HANDLE_H